﻿﻿@inherits RenderViewPage
@using System;
@using Umbraco.Cms.Web;
@using PBDesk.com.Extension.UmbHelper;
@using PBDesk.Utilities;
@{
   string feedUrl =  ViewData["feedUrl"].ToString();
   bool gatewayPageFlag = false;
   if (feedUrl.IsNotNullAndNotEmpty())
   {
       if (feedUrl.StartsWith("/"))
       {
           feedUrl = "http://" + Request.ServerVariables["HTTP_HOST"] + feedUrl;
       }
   }
   else
   {
   feedUrl = "http://goo.gl/1lqF2";
   gatewayPageFlag = true;
   }
} 
@if(gatewayPageFlag)
{
<script type="text/javascript">
    $(document).ready(function () {
        $('#testrss').rssfeed2('@feedUrl', {
            limit: 20, snippet: false, thumbnail: false
        });
    });
</script>
}
else
{
<script type="text/javascript">
    $(document).ready(function () {
        $('#testrss').rssfeed2('@feedUrl', {
            limit: 20
        });
    });
</script>
}
<div id="testrss"></div>
